<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<script type="text/javascript" src="js/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
    $(function() {
        $("#order").click(function () {
            $.ajax({
                type: "POST",
                url: "order/create",
                data: {},
                success: function () {
                    location.href="pay.html";
                }
            });
        });
    });
</script>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>下单</title>
</head>
<body>
<button id="order">下单</button>
</body>
</html>